package com.best4cloud.auth.service.impl;

import com.best4cloud.auth.security.User;
import com.best4cloud.auth.service.BestUserDetailsService;
import com.best4cloud.auth.service.feign.UserFeignClient;
import lombok.AllArgsConstructor;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

@Service(value = "userDetailsService")
@AllArgsConstructor
public class UserDetailServiceImpl implements BestUserDetailsService {

    private final UserFeignClient userFeignClient;

    @Override
    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
        return userFeignClient.loadUserByUsername(username);
    }

    @Override
    public UserDetails loadUserByMobile(String mobile) {
        return null;
    }

    @Override
    public UserDetails loadUserByUnionId(String unionId) {
        return null;
    }

}
